package cn.bouncyslime.graduationProject.nba.service;

import cn.bouncyslime.graduationProject.nba.dao.TeamDao;
import cn.bouncyslime.graduationProject.nba.dto.PerennialPlayer;
import cn.bouncyslime.graduationProject.nba.dto.TeamDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 作者： 张一卓
 * 时间： 2020/3/30 0:24
 */
@Service
public class TeamService {

    private static final Logger logger = LoggerFactory.getLogger(TeamService.class);

    @Autowired
    TeamDao teamDao;

    public List<TeamDto> listAllTeams(){
        return teamDao.listAllTeams();
    }

    public List<TeamDto> listHistoryTeams(){
        return teamDao.listHistoryTeams();
    }

    public List<TeamDto> listExistingTeams(){
        return teamDao.listExistingTeams();
    }

    public TeamDto getTeam(String teamId){
        return teamDao.getTeam(teamId);
    }

    public List<String> listAllSeasonOfTeam(String teamId){
        return teamDao.listAllSeasonOfTeam(teamId);
    }

    public List<PerennialPlayer> listRSPerennialPlayers(String teamId, String season){
        return teamDao.listRSPerennialPlayers(teamId, season);
    }

    public List<PerennialPlayer> listPSPerennialPlayers(String teamId, String season){
        return teamDao.listPSPerennialPlayers(teamId, season);
    }

    public Map getTeamRadarMap(String teamId){
        return teamDao.getTeamRadarMap(teamId);
    }
}
